﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Sahit.iSoilHotel.Portal.ServiceProxy.Tavern.Models.Record;
using FluentValidation;

namespace Sahit.iSoilHotel.Portal.ServiceProxy.Tavern.Validators.Record
{
    public class CheckInValidator : AbstractValidator<CheckInModel>
    {
        public CheckInValidator()
        {
            RuleFor(m => m.MainCustomer.Name).NotNull().WithMessage("Customer Name can not be null!");
            RuleFor(m => m.MainCustomer.IDCard).NotNull().WithMessage("Customer IDCard can not be null!");
            RuleFor(m => m.MainCustomer.Mobile).NotNull().WithMessage("Customer Mobile can not be null!");
            RuleFor(m => m.StartDate).NotNull().WithMessage("StartDate can not be null!");
            RuleFor(m => m.EndDate).NotNull().WithMessage("EndDate can not be null!");
            RuleFor(m => m.Room.RoomType.ID).NotEmpty().WithMessage("RoomType can not be null!");
        }
    }
}